<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>信息更改申请</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../css/global.css">
		<link rel="stylesheet" href="../../../css/style.css">

	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">信息更改申请</h1>
		</header>
		<div class="mui-content">
			<div class="details_con">
				<div class="clum nobor autoHeight">
					<span class="name">信息修改内容<em class="t_red">*</em></span>
					<div class="clear"></div>
					<textarea class="textarea" id="questionsAndComments" style="height: 12.5rem;"  placeholder="请输入信息修改内容"></textarea>
				</div>
			</div>
			<div class="btn_box" style="margin-bottom: 10px; overflow: hidden;">
				<span class="fl red" id="checkInstrument">仪器序列号核对</span>
				<span class="fr red" id="checkAddress">仪器地址核对</span>
			</div>
			<div class="btn_box">
				<span class="fl" id="cancelBtn">取消</span>
				<span class="fr red" id="submitBtn">保存</span>
			</div>
			<div style="height: 50px;"></div>
		</div>
		
		<!-- js代码 start -->

		<!-- 基础js start -->
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/utils/h.js"></script>
		<script src="../../../js/constant.js"></script>
		<script src="../../../js/common.js"></script>
		<script src="../../../js/utils/base64.js"></script>
		<script src="../../../js/utils/md5.js"></script>
		<script src="../../../js/utils/sortMap.js"></script>
		<script src="../../../js/utils/http.js"></script>
		<script src="../../../js/app.js"></script>
		<!-- 基础js end -->

		<script type="text/javascript" charset="utf-8">
			var ServiceNoticeId;
			var serviceNo;
			var noticeId;
			var planId;
			
			 //mui初始化
			(function($, doc) {
				
				$.init();
				
				$.plusReady(function() {
					app.closeWaiting();
					// 从上一个页面取值
					self = plus.webview.currentWebview();
					ServiceNoticeId = self.ServiceNoticeId;
					serviceNo = self.serviceNo;
					planId = self.planId;
					noticeId = self.noticeId;
					
					// 仪器序列号核对
					h("#checkInstrument").tap(function() {
						app.jumpTo('/view/service/checkInstrument/checkInstrument.html','view/service/checkInstrument/checkInstrument.html',
						{
							serviceNo:serviceNo,
							ServiceNoticeId:ServiceNoticeId,
							planId:planId,
							listName:'infoUpdate'
						})
					})
					
					// 仪器地址核对
					h("#checkAddress").tap(function() {
						app.jumpTo('/view/service/addressChange/addressChange.html','view/service/addressChange/addressChange.html',
						{
							serviceNo: serviceNo,
							serviceNos: serviceNo,
							ServiceNoticeIds: ServiceNoticeId,
							planIds: planId,
							noticeId: ServiceNoticeId,
							listName:'infoUpdate'
						})
					})
					
					// 取消
					h("#cancelBtn").tap(function() {
						mui.back();
					})
					// 提交保存
					h('#submitBtn').tap(function() {
						app.showWaiting('正在提交...')
						var questionsAndComments = h("#questionsAndComments").val();
						if (questionsAndComments == "") {
							app.closeWaiting()
							app.toast("请输入信息修改内容");
							return false;
						}
						var postParam = {
							"enginnerId": app.getUser().enginnerId,
							"serviceNo": serviceNo,
							"remarks": questionsAndComments,
							"parameter": "",
							"type": "3",
							"dizhi":true,
							"jwd":false
						}
						ajaxPost(BASE_URL + "cc/instrument/updateApply", postParam, function(data) {
							app.closeWaiting()
							if (data.code == 200) {//查询成功
								app.toast("申请成功");
								mui.back();
							} else {//查询失败
								app.toast("申请失败");
							}
						}, function(errorMsg) {
							console.log(JSON.stringify(errorMsg))
						});
					});
				});
			}(mui, document));
		</script>
		<!-- js代码 end -->

	</body>

</html>

